package test;




class Employee{
	private String name;
	private int brithMonth;
	//private double salary;
	Employee(String name,int brithMonth){
		name=this.name;
		brithMonth=this.brithMonth;
		//salary=this.salary;
	}
	int getbrithMonth(){
		return brithMonth;
	}
	public double getSalary(int month){
		
		int x=getbrithMonth();
		if(month==x){
			return 100;
		}
			
		else {
			return 0;
		}
		
		}
	
}
	



class SalariedEmployee extends Employee{
	public double salary;
	
	SalariedEmployee(String name,int brithMonth,double salary){
		
		super(name,brithMonth);
		salary=this.salary;
		
	}
	
	public double getSalary(int month){
		
		return salary;
		
	}
	
}

class HourlyEmployee extends Employee{
	HourlyEmployee(String name, int brithMonth,double hoursalary,int hour) {
		super(name, brithMonth);
		hour=this.hour;
		hoursalary=this.hoursalary;
		// TODO Auto-generated constructor stub
	}
	double hoursalary;
	int hour;
	public double getSalary(int month){
		if(hour<=160)
			return hour*hoursalary;
		else return hour*hoursalary*1.5;
		
	}
	
	
}

class SalesEmployee extends Employee{
	SalesEmployee(String name, int brithMonth,double sales,double pre) {
		super(name, brithMonth);
		sales=this.sales;
		pre=this.pre;
		// TODO Auto-generated constructor stub
	}
	double sales;
	double pre;
	public double getSalary(int month){
		return sales*pre;
	}		
	
	
}

class BasePlusSalesEmployee extends SalesEmployee{
	BasePlusSalesEmployee(String name, int brithMonth,double basesalary,double sales,double pre) {
		super(name, brithMonth,sales,pre);
		basesalary=this.basesalary;
		// TODO Auto-generated constructor stub
	}
	double basesalary;
	public double getSalary(int month){
		
		return basesalary+sales*pre;
		
	}
	
	
}


